<template>
	<view>
		<cu-custom bgColor="bg-blue" :isBack="true">
			<block slot="backText">返回</block>
			<block slot="content">{{title}}</block>
		</cu-custom>
		<!-- 菜单 -->
		<view class="cu-bar bg-white solid-bottom text-center" :style="[{top:CustomBar + 'px'}]"style="margin-top: -11%;">
			<view class="cu-item flex-sub" :class="0==tabIndex?'text-blue cur':''" @tap="tabSelect" data-id="0">
				扣分详情
			</view>
		</view>
		<view v-show="0 === tabIndex">
			<scroll-view scroll-y class="page">
			<view class=" bg-white margin-top">
				<view class="cu-timeline">
					<view class="cu-time">{{subTime}}</view>
					<view class="cu-item text-blue">
						<view class="content">
							<view class="cu-capsule radius">
								<view class="cu-tag bg-cyan">审核</view>
							</view>
							
							<view class="margin-top">
								扣分原因 : {{subReason}}
							</view>
							<view class="margin-top">
								扣分数 : {{subPoint}}
							</view>
							<view class="margin-top">
								审批人 : {{approver}}
							</view>
							<view class="margin-top">
								扣分时间 : {{subTime }}
							</view>
<!-- 							<view class="margin-top" v-if="addState !== '未审核'">
								用时 : {{'0秒'}}
							</view> -->
						</view>
					</view>
				</view>
			</view>
			      <view class="cu-bar bg-white  margin-top solid-bottom">
							<view class="action">
								<text class="cuIcon-title text-red"></text>
								<view>{{approver}}老师提醒您，下次不要再扣分了哦！</view>
							</view>
							<view class="action"></view>
						</view>
			<view class="cu-tabbar-height"></view>
			</scroll-view>
		</view>
		
	</view>
</template>

<script>
	export default {
		onLoad: function (option) {
		    this.flow = JSON.parse(decodeURIComponent(option.flow));
			this.subReason = this.flow.subReason
			this.subTime = this.flow.subTime
			this.subPoint = this.flow.subPoint
			this.subEnclosure = this.flow.subEnclosure
			this.subState = this.flow.subState
			this.approver = this.flow.approver
			this.auditTime = this.flow.auditTime
			// this.tempList1 = this.addTime.split(' ')
			// this.tempList2 = this.tempList1[0].split('-')
			// this.addYear = this.tempList2[0]
			// this.addMon = this.tempList2[1]
			// this.addDay = this.tempList2[2]
			// this.tempList2 = this.tempList1[1].split(':')
			// this.addHour = this.tempList2[0]
			// this.addmin = this.tempList2[1]
			// this.tempList1 = this.auditTime.split(' ')
			// this.tempList2 = this.tempList1[0].split('-')
			// this.auditYear = this.tempList2[0]
			// this.auditMon = this.tempList2[1]
			// this.auditDay = this.tempList2[2]
			// this.tempList2 = this.tempList1[1].split(':')
			// this.auditHour = this.tempList2[0]
			// this.auditmin = this.tempList2[1]
			
			// console.log(this.tempList)
		},
		data() {
			return {
				subEnclosure: '',
				subPoint: '',
				subReason: '',
				subState: '',
				subTime: '',
				approver: '',
				auditTime: '',
				list: [],
				id: '',
				flow: null,
				tabIndex: 0,
				form: null,
				// timeDifference: 0,
				// tempList1: [],
				// tempList2: [],
				// addYear: 0,
				// addMon: 0,
				// addDay: 0,
				// addHour: 0,
				// addmin: 0,
				// auditYear: 0,
				// auditMon: 0,
				// auditDay: 0,
				// auditHour: 0,
				// auditmin: 0,
				taskSelectedTab: 'frist',
				histoicFlowList: [],
				formReadOnly: false,
				formData: [],
				imgList: []
			}
		},
		methods:{
			tabSelect (e) {
				this.tabIndex = parseInt(e.currentTarget.dataset.id);
			}
		}
	}
</script>

<style>
	page {
		padding-top: 45px;
	}
	.cu-form-group .title {
		min-width: calc(4em + 40px);
	}

</style>
